﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using nanoCMS.Core.Concrete;

namespace nanoCMS.Core.Test
{
    /// <summary>
    /// Builds context for using in tests
    /// </summary>
    public class ContextBuilder
    {
        private WorldContext _worldContext;

        public WorldContext WorldContext
        {
            get
            {
                if (_worldContext == null) _worldContext = new WorldContext();
                return _worldContext;
            }
        }

        public Entities Entities
        {
            get
            {
                return new Entities(WorldContext.EntityConnectionString);
            }
        }
    }
}
